<template>
  <el-row justify="center" style="margin-top: 20px; margin: 50px">
    <el-form :model="form" label-width="auto" style="max-width: 600px">
      <el-form-item label="丢失宠物名字">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item label="种类">
        <el-input v-model="form.type" />
      </el-form-item>
      <el-form-item label="性别">
        <el-select v-model="form.gender" placeholder="请输入丢失宠物的性别">
          <el-option label="公" value="0" />
          <el-option label="母" value="1" />
        </el-select>
      </el-form-item>
      <el-form-item label="联系人">
        <el-input v-model="form.loss_name" />
      </el-form-item>
      <el-form-item label="联系方式">
        <el-input v-model="form.number" />
      </el-form-item>
      <el-form-item label="找回状态">
        <el-select v-model="form.found_state" placeholder="是否找回">
          <el-option label="未找回" value="0" />
          <el-option label="已找回" value="1" />
        </el-select>
      </el-form-item>
      <el-row justify="center" style="margin-top: 20px; margin: 50px">
        <el-form-item>
          <el-button type="primary" @click="onSubmit">确认</el-button>
          <el-button type="danger" plain>取消</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </el-row>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'

// do not use same name with ref
const form = reactive({
  name: '',
  type: '',
  gender: '',
  loss_name: '',
  found_state: '',
  number: ''
})

const onSubmit = () => {
  console.log('submit!')
}
</script>

<script setup></script>
